<script >
import{ref}from 'vue'

export default {
    data() {
        return {
            activeColor: 'red',
            fontSize: 30,
            styleObject: {
                color: 'green',
                fontSize: '13px'
            }
        }
    }

}

</script>

<template>
    <div :style="{ color: activeColor, fontSize: fontSize + 'px' }"> 难过的笑话</div>
    <div :style="styleObject">伤心的大人</div>
</template>

<style scoped></style>
